package com.tzf.msst.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tzf.msst.model.dto.userCommentQst.UserCommentQstQueryRequest;
import com.tzf.msst.model.entity.UserCommentQst;
import com.tzf.msst.model.vo.UserCommentQstVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 用户评论服务
 *
 */
public interface UserCommentQstService extends IService<UserCommentQst> {

    /**
     * 校验数据
     *
     * @param userCommentQst
     * @param add 对创建的数据进行校验
     */
    void validUserCommentQst(UserCommentQst userCommentQst, boolean add);

    /**
     * 获取查询条件
     *
     * @param userCommentQstQueryRequest
     * @return
     */
    QueryWrapper<UserCommentQst> getQueryWrapper(UserCommentQstQueryRequest userCommentQstQueryRequest);
    
    /**
     * 获取用户评论封装
     *
     * @param userCommentQst
     * @param request
     * @return
     */
    UserCommentQstVO getUserCommentQstVO(UserCommentQst userCommentQst, HttpServletRequest request);

    /**
     * 分页获取用户评论封装
     *
     * @param userCommentQstPage
     * @param request
     * @return
     */
    Page<UserCommentQstVO> getUserCommentQstVOPage(Page<UserCommentQst> userCommentQstPage, HttpServletRequest request);
}
